package Dinamica;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class Condorcet_Winners {

	
	public static void main(String[] args) throws IOException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		String linea;
		int casos = 0;
		while((linea = bf.readLine())!= null){
			casos++;
			int r = Integer.parseInt(linea.substring(0, linea.charAt(' ')));
			int c = Integer.parseInt(linea.substring(linea.charAt(' '), linea.length()-1));
			ArrayList<String> temp = new ArrayList<String>();
			while(r!=0){
				r--;
				linea = bf.readLine();
				temp.add(linea);
			}
			System.out.println("Case "+casos+": "+concordet(temp,c));
		}
			
			
	}
	
	
	public static int concordet(ArrayList<String> ent, int nums){
		ArrayList<Integer> eliminados = new ArrayList<Integer>();
		for(int i=0; i!=nums; i++){
			if(!eliminados.contains(i)){
				for(int j=0; j!=nums; j++){
					if(!eliminados.contains(j)){
						
					}
				}
			}
		}
	}
	
	public static int primero(int a, int b, String frase){
		StringTokenizer st = new StringTokenizer(frase," ");
		while(st.hasMoreTokens()){
			int x = Integer.parseInt(st.nextToken());
			if(x==a) return a;
			if(x==b) return b;
		}
		return -1;
	}

}
